package pri.zxx.excelgenerate.excelhanler.excelentity;

import lombok.Data;
import lombok.experimental.Accessors;
import pri.zxx.excelgenerate.excelhanler.RowHeightConstant;

import java.util.ArrayList;
import java.util.List;

@Data
@Accessors(chain = true)
public class CustomRow {


    private short rowHeight = RowHeightConstant.ROW_HEIGHT_18;

    private List<CustomCell> list = new ArrayList<>();

    public void add(CustomCell c) {
        list.add(c);
    }

    public CustomRow() {
    }

    public CustomRow(short rowHeight) {
        this.rowHeight = rowHeight;
    }

    public CustomRow(short rowHeight, List<CustomCell> customCell) {
        this.rowHeight = rowHeight;
        this.list = customCell;
    }

    /**
     * 创建行
     */
    public static CustomRow createRow(List<CustomCell> cls, short rowHeightConstant) {
        return new CustomRow(rowHeightConstant, cls);
    }

}